﻿<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>发表问题</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" th:href="@{/res/layui/css/layui.css}">
  <link rel="stylesheet" th:href="@{/res/css/global.css}">

  <!--header-->
  <link rel="stylesheet" type="text/css" th:href="@{/home/styles/bootstrap4/bootstrap.min.css}">
  <link th:href="@{/home/plugins/font-awesome-4.7.0/css/font-awesome.min.css}" rel="stylesheet" type="text/css">
  <link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/owl.carousel.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/owl.theme.default.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/home/plugins/OwlCarousel2-2.2.1/animate.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/home/plugins/jquery.mb.YTPlayer-3.1.12/jquery.mb.YTPlayer.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/home/styles/main_styles.css}">
  <link rel="stylesheet" type="text/css" th:href="@{/home/styles/responsive.css}">

<script th:src="@{/res/layui/layui.js}"></script>

  <script language="javascript">
      function AcceptData(num){
          document.getElementById("accepDate").value+=num;
      }
  </script>



</head>
<body>
<header class="header">
  <div class="container">
    <div class="row">
      <div class="col">
        <div class="header_content d-flex flex-row align-items-center justify-content-start">
          <div class="logo"><a th:href="@{/m}">EDU</a></div>          <nav class="main_nav">
            <ul>
              <li class="active"><a th:href="@{/queryByName}">问答首页</a></li>
              <li><a th:href="@{/addquery}">悬赏问题</a></li>
              <li><a th:href="@{/queryhomepage}">未解决</a></li>
              <!--<li><a th:href="@{/queryhomepage}">光荣榜</a></li>-->
              <li><a th:href="@{/queryhomepage}">C币充值</a></li>
            </ul>
          </nav>
          <div class="search_container ml-auto">

            <form action="#">
              <input type="search" class="header_search_input" required="required" placeholder="Type to Search...">
              <img class="header_search_icon" th:src="@{/home/images/search.png}" alt="">
            </form>
            &nbsp;&nbsp;<a th:href="@{/login}">登录</a>&nbsp;|&nbsp;<a th:href="@{/register}">注册</a>          </div>
          <div class="hamburger ml-auto menu_mm">
            <i class="fa fa-bars trans_200 menu_mm" aria-hidden="true"></i>
          </div>
        </div>
      </div>
    </div>
  </div>
</header>
</div>




<div class="main layui-clear">
  <div class="wrap">
  <div class="fly-panel" pad20>
    <h2 class="page-title">发表问题</h2>
    <div class="layui-form layui-form-pane">
      <form th:action="@{/newquery}" action="" method="post">
        <div class="layui-form-item">
          <label class="layui-form-label">标题</label>
          <div class="layui-input-block">
            <input type="text" id="query_title" name="querytitle" required lay-verify="required" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-form-item layui-form-text">
          <div id="editor">
            <p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
          </div>
          <input type="hidden" id="text1" name="querydetail" value="query_detail"/>
          <!-- 注意， 只需要引用 JS，无需引用任何 CSS ！！！-->
          <script type="text/javascript" th:src="@{/js/wangEditor.min.js}"></script>
          <script type="text/javascript">
              var E = window.wangEditor
              var editor = new E('#editor')
              editor.customConfig.uploadImgShowBase64=true
              editor.create()
              function getContent(){
                  var text = editor.txt.html();
                  document.getElementById("text1").value = text;
              }
          </script>
        </div>
        <div class="layui-form-item">
          <label class="layui-form-label">悬赏</label>
          <div class="layui-input-block">
            <input type="number"  name="querymoney" required lay-verify="required" autocomplete="off" class="layui-input">
          </div>
        </div>
                <div class="layui-form-item">
          <label class="layui-form-label">标签</label>
          <div class="layui-input-block">
            <input type="text" id="accepDate" name="tag" required lay-verify="required" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-form-item">
        <input type="button"  name="Submit" onclick="AcceptData('  高中')" value="高中"></input>
        <input type="button" name="Submit" onclick="AcceptData('  数学')" value="数学"></input>
          <input type="button" name="Submit" onclick="AcceptData('  语文')" value="语文"></input>
        </div>
        <div class="layui-form-item">
          <button class="layui-btn" onclick="getContent()" lay-filter="*" lay-submit>立即发布</button>
        </div>
      </form>
    </div>
  </div>
  </div>
</div>

 <script type="text/javascript" charset="utf-8" th:src="@{/res/js/kindeditor.js}"></script>
  <script type="text/javascript">
    KE.show({
        id : 'content',
		resizeMode : 1,
        cssPath : './index.css',
        items : [
        'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
        'removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
        'insertunorderedlist', 'emoticons', 'image', 'link']
    });
  </script>
<script>

layui.cache.page = '';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "2.0.0"
  ,base: '../res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>
</body>
</html>